(function($) { 
   $.fn.center=function(padding){
      if(!padding){padding=0}
      	var browsernum=jQuery.browser.msie||jQuery.browser.opera?padding+2:padding
        this.each(function(){
   			$(this).css({ top: "50%", left: "50%","margin-top": "-"+(($(this).height()/2)+browsernum)+"px", "margin-left": "-"+(($(this).width()/2)+browsernum)+"px" })
        });
        return this;	
   }
   
   $.script=function(src,path){
   		path=path||'';
   		$($.makeArray(src)).each(function(){
   			$("head").append("<script language='javascript' type='text/JavaScript' src='"+path+this+"'></script>");	
   		});
   }
})(jQuery);